<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.com">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!-- css -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
          crossorigin="anonymous">
    <!-- /css -->
    <title>easyblog</title>
</head>

<body>
<div style="text-align: center">
    <a th:href="@{admin/index}" style="text-decoration: none; font-size: xx-large">这是后台管理界面</a>
</div>

<div class="container">
    <div class="row">
        <!-- 左侧边栏 -->
        <div class="col-2">
            <div class="list-group" style="font-size: x-large">
                <a th:href="@{/admin/user}">用户管理</a>
                <a th:href="@{/admin/article}">文章管理</a>
            </div>
        </div>
        <!-- /左侧边栏 -->

        <!-- 右 -->
        <div class="col-10">
            <br>
            <a th:href="@{/admin/add_article}">增加文章</a>
            <!-- 文章表格 -->
            <table class="table table-striped table-bordered">
                <thead>
                <tr>
                    <th>文章标题</th>
                    <th>发布时间</th>
                    <th>作者id</th>
                </tr>
                </thead>

                <tbody>
                <tr th:each="article:${articles}">
                    <td><a href="#" th:text="${article.articleTitle}"></a></td>
                    <td th:text="${article.articleCreatedTime}"></td>
                    <td th:text="${article.userId}"></td>
                </tr>
                </tbody>
            </table>
            <!-- /文章表格 -->
        </div>
        <!-- /右 -->
    </div>
</div>


</body>
</html>